package com.base.vistter.iframe.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

@Data
public class BaseEntity implements Serializable {

    @ExcelIgnore
    @TableId(type = IdType.AUTO)
    private Integer id;

    @ExcelIgnore
    @TableField(fill = FieldFill.INSERT)
    private Integer creator;

    @ExcelIgnore
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createDate;

    @ExcelIgnore
    @JsonIgnore
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Integer modifier;

    @ExcelIgnore
    @JsonIgnore
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date modifyDate;

    @ExcelIgnore
    private String remark;

    @ExcelIgnore
    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    private Integer isDelete;

    @ExcelIgnore
    @TableField(fill = FieldFill.INSERT)
    private Integer sysDepartId;

    @ExcelIgnore
    @JsonIgnore
    @TableField(fill = FieldFill.INSERT)
    private Integer sysFirmId;

}
